from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from myblog.post.models import Post

# Create your models here.
class Comment(models.Model):
    id = models.IntegerField(primary_key=True)
    content = models.TextField(_("Description of product"), default='', blank=True)
    created = models.DateTimeField(_(u"Created"), auto_now_add=True)
    name = models.CharField(_(u"User"), max_length=255)
    post = models.ForeignKey(Post, verbose_name=_(u"Post"))
    def __unicode__(self):
        return 'post-comment:' + self.content
    
class Photo_Comment(models.Model):
    id = models.IntegerField(primary_key=True)
    content = models.TextField(_("Description of product"), default='', blank=True)
    created = models.DateTimeField(_(u"Created"), auto_now_add=True)
    name = models.CharField(_(u"User"), max_length=255)
    def __unicode__(self):
        return 'photo-comment:' + self.content
    
class About_Comment(models.Model):
    id = models.IntegerField(primary_key=True)
    content = models.TextField(_("Description of product"), default='', blank=True)
    created = models.DateTimeField(_(u"Created"), auto_now_add=True)
    name = models.CharField(_(u"User"), max_length=255)
    def __unicode__(self):
        return 'about-comment:' + self.content